package com.wiserp.rest.model;


public class OpResult {
	private String result;
	private String msg;
	private int errorCode;

	public static OpResult SUCCESS = new OpResult("success", "",0);
	
	public static OpResult UNKNOWNFAIL = FAIL("未知错误，请检查输入参数",-1);
	
	public static OpResult AUTHFAIL = FAIL("登录失败，请检查账户密码",-2);

	public static OpResult FAIL(String msg,int errorCode) {
		return new OpResult("fail", msg,errorCode);
	}

	private OpResult(String result, String msg,int errorCode) {
		this.result = result;
		this.msg = msg;
		this.errorCode = errorCode;
	}

	public String getResult() {
		return result;
	}

	public void setResult(String result) {
		this.result = result;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public int getErrorCode() {
		return errorCode;
	}

	public void setErrorCode(int errorCode) {
		this.errorCode = errorCode;
	}	
}
